<template>
    <div>
        <dv-capsule-chart :config="config" style="width:300px;height:200px"/>
    </div>
</template>

<script>
    //胶囊
    export default {
        route: false,
        data() {
            return {
                form: [],
                config: {
                    data: [],
                    colors: ['#e062ae', '#fb7293', '#e690d1', '#32c5e9', '#96bfff'],
                    unit: '单位',
                    showValue: true
                },
            }
        },
        async created() {
            this.form =  await this.axios.get('good/rate/rank')
            this.form.forEach((item) => this.config.data.push(new Object({name:item.good_title, value:item.avgscore})))
            this.config={...this.config}
        }
    }
</script>

<style scoped>

</style>